import { Column, Entity, JoinColumn, ManyToOne } from 'typeorm'
import { Staff } from 'src/modules/staff/entities/staff.entity'
import { AwardRule } from 'src/modules/award-rule/entities/award-rule.entity'
import { App } from 'src/app.entity'
@Entity()
export class Award extends App {
  @ManyToOne(() => Staff)
  @JoinColumn({ name: 'staff_id' })
  staff: Staff
  @ManyToOne(() => AwardRule)
  @JoinColumn({ name: 'award_rule_id' })
  awardRule: AwardRule
  @Column({ type: 'varchar', length: 50, nullable: true })
  desc?: string
  @Column({ type: 'varchar', length: 10 })
  date: string
}
